﻿using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace SistemaAdministracion.Models.BaseClass
{
    [Table("persona", Schema = "genericos")]
    public class Persona
    {
        public Persona()
        {
            this.RepLegal = new HashSet<RepLegal>();
            this.CargaFamiliar = new HashSet<CargaFamiliar>();
        }

        [Column("idpersona")]
        public int IdPersona { get; set; }
        [Column("run")]
        public int RUN { get; set; }
        [Column("dv")]
        public char DV { get; set; }
        [Column("nombres")]
        public string Nombres { get; set; }
        [Column("appaterno")]
        public string ApPaterno { get; set; }
        [Column("apmaterno")]
        public string ApMaterno { get; set; }
        [Column("sexo")]
        public int Sexo { get; set; }
        [Column("fechanacimientos")]
        public DateTime FecNacimientos { get; set; }
        [Column("vigencia")]
        public int Vigencia { get; set; }

        public virtual ICollection<RepLegal> RepLegal { get; set; }
        public virtual ICollection<CargaFamiliar> CargaFamiliar { get; set; }
    }
}
